<?php

class Controller_Invite extends Controller_Website
{

    public function before() {
        parent::before();
        $this->mod = Model::factory('directory');
        $this->man = Model::factory('manager');
        $this->section = 'invite';
    }

	public function actionIndex($mail,$key)
	{
        $this->man->confirmInvitation($mail,$key);
        echo'<script type="text/javascript">alert(\'OK\');</script>';
//        system::dump($this->man->confirmInvitation($mail,$key));exit();
        $this->response->redirect('/account/');
	}
}